//
//  FontControl.m
//  MansApp
//
//  Created by lanou3g on 15/7/24.
//  Copyright (c) 2015年 ACH. All rights reserved.
//

#import "FontControl.h"

@implementation FontControl

- (instancetype)initWithFrame:(CGRect)frame{
    self = [super initWithFrame:frame];
    if (self) {
        self.imageView = [[UIImageView alloc]initWithFrame:CGRectMake(0, 0, kP6width(150), kP6Height(40))];
        self.imageView.image = [UIImage imageNamed:@"cm2_btn_black_full@3x"];
        self.imageView.userInteractionEnabled = YES;
        
        
        self.smallButton = [UIButton buttonWithType:UIButtonTypeSystem];
        self.smallButton.frame = CGRectMake(0, 0, kP6width(50), kP6Height(40));
        [self.smallButton setTitle:@"小" forState:UIControlStateNormal];
        self.smallButton.tag = 100;
        
        self.moderateButton = [UIButton buttonWithType:UIButtonTypeSystem];
        self.moderateButton.frame = CGRectMake(kP6width(50), 0, kP6width(50), kP6Height(40));
        [self.moderateButton setTitle:@"中" forState:UIControlStateNormal];
        self.moderateButton.tag = 101;
        
        self.bigButton = [UIButton buttonWithType:UIButtonTypeSystem];
        self.bigButton.frame = CGRectMake(kP6width(100), 0, kP6width(50), kP6Height(40));
        [self.bigButton setTitle:@"大" forState:UIControlStateNormal];
        self.bigButton.tag = 102;
  
         
        [self addSubview:_imageView];
        [self addSubview: _smallButton];
        [self addSubview: _moderateButton];
        [self addSubview:_bigButton];
        
        
        
    }
    
    return self;
}


- (void)addTarget:(id)target action:(SEL)action forControlEvents:(UIControlEvents)events{
    
     [self.smallButton addTarget:target action:action forControlEvents:events];
     [self.moderateButton addTarget:target action:action forControlEvents:events];
     [self.bigButton addTarget:target action:action forControlEvents:events];
}



@end
